--- ./kazam/backend/grabber.py.orig	2014-08-18 16:48:36.000000000 +0000
+++ ./kazam/backend/grabber.py	2014-08-30 18:41:04.000000000 +0000
@@ -21,7 +21,6 @@
 
 
 import os
-import subprocess
 import logging
 logger = logging.getLogger("Grabber")
 
@@ -67,13 +66,6 @@
         dm = Gdk.Display.get_device_manager(disp)
         pntr_device = dm.get_client_pointer()
 
-        #
-        # Rewrite this, because it sucks
-        #
-        if prefs.shutter_sound and (not self.god):
-            soundfile = os.path.join(prefs.datadir, 'sounds', prefs.sound_files[prefs.shutter_type])
-            subprocess.call(['/usr/bin/canberra-gtk-play', '-f', soundfile])
-
         if self.xid:
             if prefs.capture_borders_pic:
                 app_win = GdkX11.X11Window.foreign_new_for_display(disp, self.xid)
@@ -121,37 +113,40 @@
             cursor = Gdk.Cursor.new_for_display(Gdk.Display.get_default(), Gdk.CursorType.LEFT_PTR)
             c_picbuf = Gdk.Cursor.get_image(cursor)
 
-            if self.xid and prefs.capture_borders_pic:
-                pointer = app_win.get_device_position(pntr_device)
-                (px, py) = (pointer[1], pointer[2])
-                logger.debug("XID cursor: {0} {1}".format(px, py))
-                c_picbuf.composite(self.pixbuf, rx, ry, rw, rh,
-                                   px + dx - 6,
-                                   py + dy - 2,
-                                   1.0,
-                                   1.0,
-                                   GdkPixbuf.InterpType.BILINEAR,
-                                   255)
+            if c_picbuf is not None:
+                if self.xid and prefs.capture_borders_pic:
+                    pointer = app_win.get_device_position(pntr_device)
+                    (px, py) = (pointer[1], pointer[2])
+                    logger.debug("XID cursor: {0} {1}".format(px, py))
+                    c_picbuf.composite(self.pixbuf, rx, ry, rw, rh,
+                                       px + dx - 6,
+                                       py + dy - 2,
+                                       1.0,
+                                       1.0,
+                                       GdkPixbuf.InterpType.BILINEAR,
+                                       255)
 
-            else:
-                (scr, px, py) = pntr_device.get_position()
-                cur = scr.get_monitor_at_point(x, y)
+                else:
+                    (scr, px, py) = pntr_device.get_position()
+                    cur = scr.get_monitor_at_point(x, y)
 
-                px = px - HW.screens[cur]['x']
-                py = py - HW.screens[cur]['y']
+                    px = px - HW.screens[cur]['x']
+                    py = py - HW.screens[cur]['y']
 
-                #
-                # Cursor is offset by 6 pixels to the right and 2 down
-                #
-                c_picbuf.composite(self.pixbuf, 0, 0, w - 1, h - 1,
-                                   px - 6,
-                                   py - 2,
-                                   1.0,
-                                   1.0,
-                                   GdkPixbuf.InterpType.BILINEAR,
-                                   255)
+                    #
+                    # Cursor is offset by 6 pixels to the right and 2 down
+                    #
+                    c_picbuf.composite(self.pixbuf, 0, 0, w - 1, h - 1,
+                                       px - 6,
+                                       py - 2,
+                                       1.0,
+                                       1.0,
+                                       GdkPixbuf.InterpType.BILINEAR,
+                                       255)
 
-                logger.debug("Cursor coords: {0} {1}".format(px, py))
+                    logger.debug("Cursor coords: {0} {1}".format(px, py))
+            else:
+                logger.debug("Can't display cursor")
 
         if self.area is not None:
             logger.debug("Cropping image.")
